<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        .search-box{
            padding: 20px;
        }
        .search-box>img{
            height: 36px;
            width: auto;
            vertical-align: top;
        }
        .search-box .input-box{
            display: inline-block;
            height: 36px;
            margin-left: 20px;
            font-size: 0px;
            position: relative;
        }
        .search-box .input-box>input[type=text]{
            height: 100%;
            width: 400px;
            box-sizing: border-box;
            outline: 0px;
            border: none;
            font-size: 18px;
            color: #333333;
            vertical-align: middle;
            box-shadow: 0px 1px 0px #cccccc;
            position: relative;
            z-index: 99;
            background-color: transparent;
        }
        .search-box .input-box>span{
            display: inline-block;
            height: 100%;
            line-height: 36px;
            background-color: #4e6ef2;
            vertical-align: middle;
            font-size: 18px;
            color: white;
            padding: 0px 20px;
            border-right: 2px solid #4e6ef2;
            border-top-right-radius: 12px;
            border-bottom-right-radius: 12px;
            box-sizing: border-box;
        }
        .search-box .result{
            position: absolute;
            top: 0px;
            left: 0px;
            width: 400px;
            padding: 14px;
            padding-top: 44px;
            list-style: none;
            border: 2px solid #4e6ef2;
            border-radius: 12px;
            border-top-right-radius: 0px;
            box-sizing: border-box;
        }
        .search-box .result>li{
            font-size: 18px;
            margin-bottom: 10px;
        }
    </style>
</head>
<body>
    <div id="app">
        <div class="search-box">
            <img src="https://www.baidu.com/img/flexible/logo/pc/result.png" alt="" srcset="">
            <div class="input-box">
                <input type="text">
                <span>百度一下</span>
                <ul class="result">
                    <li>结果</li>
                    <li>结果</li>
                    <li>结果</li>
                    <li>结果</li>
                </ul>
            </div>
        </div>
    </div>
</body>
<script>
// https://www.baidu.com/sugrec
/*
    {
        pre:"1",
        p:"3",
        ie:"utf-8",
        json:"1",
        prod:"pc",
        from:"pc_web",
        sugsid:"33423,1420,33419,33306,31660,33287,33351,33313,33312,33311,33310,33163,33309,26350,33308,33307,33265,33389,33381,33370",
        cb:自定义,  --> jquery jsonp 请求默认的回调前缀叫做 callback 百度查询需要将 callback变为 cb  (jsonp:cb)
        wd:用户输入的查询关键字
    }

*/

</script>
</html>